ZapTCP is a (very) small System Extension (INIT), which should be useful to people writing applications which use Apple's MacTCP.
As anyone who has written MacTCP programs knows, it is a long process involving the crashing and rebooting of the Mac about 20-30 times an hour (at least that's how it turns out for me). To help my finger heal up (it was getting tired of hitting the reset key), I wrote ZapTCP.
The INIT works by installing a system-wide patch which takes control when an application quits (or is quit by a forced MacsBug "es"). When it runs, the code scans through all of the currently open MacTCP streams and connections, looking for those that have their stream buffers allocated within the heap that is about to disappear. When ZapTCP finds a stream whose buffers are about to become no-man's land, it forces the connection closed and releases the stream, posting a notification to the user.
Since ZapTCP opens the MacTCP driver whenever an application quits, please don't run it if you don't have MacTCP or don't have MacTCP configured properly. Doing so will almost certainly result in nasty crashes.